package com.xiaofengstu.mcams;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@EnableCaching
public class McamsApplication {

  @Bean
  public MybatisPlusInterceptor paginationInnerInterceptor(){
    MybatisPlusInterceptor mybatisPlusInterceptor =new MybatisPlusInterceptor();
    mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
    return mybatisPlusInterceptor;
  }

  public static void main(String[] args) {
    SpringApplication.run(McamsApplication.class, args);
  }

}
